<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
	<meta charset="utf-8"> 
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=500" />
	<meta name="keywords" content="ScrollMagic, example, scrolling, attaching, scrollbar, multiple, scroll, directions" />
	<meta name="author"	content="Jan Paepke (www.janpaepke.de)" />
	<title>Multiple Scroll Directions - Examples - ScrollMagic</title>

	<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic|Josefin+Slab:400,700italic' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="../../assets/css/normalize.css" type="text/css">
	<link rel="stylesheet" href="../../assets/css/style.css" type="text/css">
	<link rel="stylesheet" href="../../assets/css/examples.css" type="text/css">
	<link rel="shortcut icon" href="../../assets/img/favicon.ico" type="image/x-icon">

	<script type="text/javascript" src="../../assets/js/lib/jquery.min.js"></script>
	<script type="text/javascript" src="../../assets/js/lib/highlight.pack.js"></script>
	<script type="text/javascript" src="../../assets/js/lib/modernizr.custom.min.js"></script>
	<script type="text/javascript" src="../../assets/js/examples.js"></script>
	
	<script type="text/javascript" src="../../assets/js/lib/gsap3/gsap.min.js"></script>
	<script type="text/javascript" src="../../scrollmagic/uncompressed/ScrollMagic.js"></script>
	<script type="text/javascript" src="../../scrollmagic/uncompressed/plugins/animation.gsap.js"></script>
	<script type="text/javascript" src="../../scrollmagic/uncompressed/plugins/debug.addIndicators.js"></script>
</head>
<body>
	<ul id="menu"></ul>
	<div id="content-wrapper">
		<div id="example-wrapper">
			<div class="scrollContent">
				<section id="titlechart">
					<div id="description">
						<h1 class="badge gsap">Multiple Scroll Directions</h1>
						<h2>When scrolling one way just isn't enough.</h2>
						<p>
							If you want to react on more than one scroll direction just add more than one controller.
						</p>
						<a href="#" class="viewsource">view source</a>
					</div>
				</section>
				<section id="multiDirect" class="demo fullheight doublewidth">
					<div class="spacer s0"></div>
					<div id="animate" class="box1 blue">
						<p>
							Down to resize.<br>
							Right to rotate.
						</p>
						<a href="#" class="viewsource">view source</a>
					</div>
					<script>
						$(function () { // wait for document ready
							// init controller
							var controller = new ScrollMagic.Controller();

							// build tween
							var tween = TweenMax.to("#animate", 0.5, {scale: 3, ease: Linear.easeNone});

							// build scene
							var scene = new ScrollMagic.Scene({triggerElement: "#multiDirect", duration: 400, offset: 250})
											.setTween(tween)
											.setPin("#animate")
											.addIndicators({name: "resize"}) // add indicators (requires plugin)
											.addTo(controller);

							// init controller horizontal
							var controller_h = new ScrollMagic.Controller({vertical: false});

							// build tween horizontal
							var tween_h = TweenMax.to("#animate", 0.5, {rotation: 360, ease: Linear.easeNone});

							// build scene
							var scene_h = new ScrollMagic.Scene({duration: 700})
											.setTween(tween_h)
											.setPin("#animate")
											.addIndicators({name: "rotate"}) // add indicators (requires plugin)
											.addTo(controller_h);
						});
					</script>
				</section>
				<div class="spacer s_viewport doublewidth"></div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="../../assets/js/tracking.js"></script>
</body>
</html>
